package com.cashmama.market.api.infras.enums.error;

import com.fqgj.exception.enums.ErrorCodeEnum;
import org.springframework.http.HttpStatus;

/**
 * @program: market-api
 * @description
 * @author: frank
 * @create: 2019-12-20 12:13
 **/
public enum VerifyCodeErrorCodeEnum implements ErrorCodeEnum {

    VERIFYCODE_NOT_CORRECT(60001, "Please enter the correct OTP", HttpStatus.OK),
    VERIFYCODE_TYPE_NOT_EXIST(60002, "Request verification code type does not exist", HttpStatus.OK),
    VERIFYCODE_IMG_EMPTY(60003, "Image verification code is empty", HttpStatus.OK),
    VERIFYCODE_IMG_NOT_CORRECT(60004, "Please enter the correct image verification code", HttpStatus.OK);
    private Integer code;

    private String desc;

    private HttpStatus httpStatus;

    VerifyCodeErrorCodeEnum(Integer code, String desc, HttpStatus httpStatus) {
        this.code = code;
        this.desc = desc;
        this.httpStatus = httpStatus;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return desc;
    }

    public VerifyCodeErrorCodeEnum setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public VerifyCodeErrorCodeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }

    public VerifyCodeErrorCodeEnum setHttpStatus(HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
        return this;
    }


}
